<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="/resource/css/admin/main.css" type="text/css" rel="stylesheet" />
<link href="/resource/css/admin/right.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/resource/js/jquery.js"></script>
<script type="text/javascript" src="/resource/js/base.js"></script>
<script type="text/javascript" src="/resource/js/admin/weixinsync.js"></script>
</head>
<body>
	<div class="position"><span>您的当前位置：</span>业务处理 > 微博微信 > 微信同步</div>
	<form name="form_weixin" method="post" action="sync">
    	<div class="rightbody f">
        	<div class="rightbodycontent">
        		<#if cansend>
	                <table class="tools">
	                    <tr>
	                        <td>
								栏目：
	                            <select onchange="switchcolumns(this)">
	                                <option value="-1">--全部--</option>
	                                <#list columnses as columns>
	                            		<option value="1-${columns.id}"<#if columnsid?? && columns.id == columnsid> selected</#if>><#if columns.parentId gt 0>  ┝ </#if>${columns.name}</option>
	                                </#list>
	                                <#if zhuantis?size gt 0>
		                                <#list zhuantis as zhuanti>
		                                    <option value="2-${zhuanti.id}"<#if zhuantiid?? && zhuanti.id == zhuantiid> selected</#if>>${zhuanti.name}</option>
		                                    <#list columnsForZhuanties as columns>
		                                    	<#if columns.zhuanti.id == zhuanti.id>
	                                    			<option value="1-${columns.id}"<#if columnsid?? && columns.id == columnsid> selected</#if>>  ┝ ${columns.name}</option>
		                                        </#if>
		                                    </#list>
		                                </#list>
		                            </#if>
	                            </select>
	                            <#if onlycurcolumnsisshow?default(false)>
	                                <label><input type="checkbox" name="onlycurcolumns"<#if onlycurcolumns> checked</#if> onclick="getform(this).submit()" />只看父栏目</label>
	                            </#if>
	                            &nbsp;
								标题：<input type="text" name="title" value="${title!}" style="width:200px" />&nbsp;<a onclick="getform(this).submit()" class="linkbtn search">搜索</a>
	                            <#if Session.admin.adminGlobalpermission.id gt 1>
	                                &nbsp;<label><input type="checkbox" name="onlyme"<#if onlyme> checked</#if> onclick="getform(this).submit()" />只看我的</label>
	                            </#if>&nbsp;
	                            <span style="color:red">${msg}</span>
	                        </td>
	                        <td align="right">
	                             <a onclick="syncselectarticle()" class="linkbtn weixin">微信同步所选文档</a>
	                        </td>
	                    </tr>
	                </table>
	                <table cellspacing="1" cellpadding="4" class="tablelist">
	                    <tr>
	                        <th><input type="checkbox" onclick="selectallcheckbox(this)" /></th>
	                        <th>管理者</th>
			                <th>标题</th>
			                <th>发布时间</th>
			                <th>栏目数</th>
			                <th>操作</th>
	                    </tr>
	                    <#list articles as article>
	                        <#assign articleColumns = "">
	                        <#list article.articleReColumnses as arc>
								 <#assign articleColumns = articleColumns + " " + arc.columns.name>
							</#list>
							<tr<#if article_index % 2 == 1> class="splittr"</#if>>
								<td align="center"><input type="checkbox" name="ids" value="${article.id}" /></td>
	                            <td align="center">${article.admin.name}</td>
	 							<td align="center"<#if article.bold || article.red> style="<#if article.bold>font-weight:bold;</#if><#if article.red>color:red;</#if>"</#if>>${article.title}<#if article.image??> <img src="/resource/image/admin/main/right/image.png" height="13" style="vertical-align:text-bottom;" /></#if></td>
	                            <td align="center">${article.publishtime?string('yyyy-MM-dd HH:mm:ss')}</td>
	                            <td align="center"<#if articleColumns != ""> title="${articleColumns?trim}"</#if>>${article.articleReColumnses?size}</td>
	                            <td align="center">
	                                <a href="syncdo?articleids=${article.id}" class="linkbtn weixin noborder" onclick="dataloading()">微信同步</a>
	                            </td>
							</tr>
	                    </#list>
	                </table>
	                <br />
	                <#include "../../include/pager.html">
                <#else>
                	<br />
					<table cellspacing="1" cellpadding="4" class="tableedit">
						<tr>
							<td style="color:red;">友情提示：</td>
							<td>${msg}</td>
						</tr>
					</table>
                </#if>
            </div>
        </div>
	</form>
</body>
</html>